package com.farewell.blog.service.impl;

import com.farewell.blog.mapper.UserMapper;
import com.farewell.blog.pojo.User;
import com.farewell.blog.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Farewell
 * @date 2021/2/15
 */
@Service
@Transactional(rollbackFor = RuntimeException.class)
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserByUserName(String username) {
        return userMapper.getUserByUsername(username);
    }
}
